
<!DOCTYPE html>
<html>
<head>
    <meta charset="gbk" />
    <title>uploader�ļ���demo</title>
    <script src="//g.tbcdn.cn/??kissy/k/1.4.2/seed-min.js,tb/global/3.0.4/global-min.js" charset="utf-8"></script>
</head>
<body id="err-page">
<div id="page">
    <div id="content" class="grid-c">
        <h2>uploader����ͨ�ýӿ�</h2>

        <p>Ĭ��ʹ��ajax�ϴ�����֧��ajax��������ʹ��iframe�ϴ���</p>
        <p>iframe�ϴ���ǿ������domain��������ϣ�����ã���ʹ��flash�ϴ�������typ:["ajax","flash"]��</p>

        <div class="uploader-wrapper">
            <div class="grid">
                <input type="file" class="g-u" id="J_UploaderBtn" value="�ϴ�ͼƬ" name="imgFile"  accept="image/*" >
                <input type="hidden" id="J_Urls" name="urls" value="//img03.taobaocdn.com/bao/uploaded/i3/750975210/T20xOMXAJaXXXXXXXX_!!750975210.jpg_728x728.jpg,//img03.taobaocdn.com/bao/uploaded/i3/750975210/T20xOMXAJaXXXXXXXX_!!750975210.jpg_728x728.jpg" />
                <div class="g-u">�������ϴ�<span id="J_UploadCount">3</span>��ͼƬ</div>
            </div>
            <ul id="J_UploaderQueue" class="grid"></ul>
        </div>
        <script type="text/javascript">
            var S = KISSY;
            S.config({
                packages:[
                    {
                        name:"kg",
                        path:"//g.tbcdn.cn/kg/",
                        charset:"utf-8",
                        ignorePackageNameInUri:true
                    }
                ]
            });

            if (S.Config.debug) {
                var srcPath = "../";
                S.config({
                    packages:[
                        {
                            name:"kg/uploader/3.0.0",
                            path:srcPath,
                            charset:"utf-8",
                            ignorePackageNameInUri:true
                        }
                    ]
                });
            }

            KISSY.use('kg/uploader/3.0.0/aliUploader,kg/uploader/3.0.0/plugins/plugins,kg/uploader/3.0.0/themes/imageUploader/index,kg/uploader/3.0.0/themes/imageUploader/style.css', function (S, AliUploader,plugins,ImageUploader) {
                var uploader = new AliUploader('#J_UploaderBtn',{
                    filter:function(data){
                        debugger;
                    }
                });
                uploader.set('filter',function(data){
                    data.success = 1;
                    return data;
                })
                //ʹ������
                uploader.theme(new ImageUploader({ queueTarget: '#J_UploaderQueue' }));
                //��֤����
                uploader.plug(new plugins.Auth({
                            //�����ϴ�����
                            max:3,
                            //ͼƬ����������С
                            maxSize:5120
                        }))
                    //url��������
                        .plug(new plugins.UrlsInput({target:'#J_Urls'}))
                    //�����񼯺�
                        .plug(new plugins.ProBars())
                    //��ק�ϴ�
                        .plug(new plugins.Filedrop())
                    //ͼƬԤ��
                        .plug(new plugins.Preview())
                        .plug(new plugins.MiniLogin())
                ;
            })

        </script>
    </div>
</div>
</body>
</html>